import { mergeOptions, resolveConstructorOptions } from './util.js'
import { initLifecycle, initEvents, initRender, callHook, initInjections, initState, initProvide } from './util.js'
export default function (Vue) {
    let uid = 0
    Vue.prototype._init = function (options) {
        const vm = this
        vm._uid = uid++
        vm.$options = options
        vm._renderProxy = vm
        vm._self = vm
        initLifecycle(vm)
        initEvents(vm)
        initRender(vm)
        callHook(vm, 'beforeCreate')
        initInjections(vm) // resolve injections before data/props
        initState(vm)
        initProvide(vm) // resolve provide after data/props
        callHook(vm, 'created')
        if (vm.$options.el) {
            vm.$mount(vm.$options.el)
        }
    }
}